<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--深度耦合式写法-->
<button onclick="alert('hi~~');">点我</button>
<a href="javascript:alert('hi~');">来点我</a>
<a href="javascript:;">点呀</a>

<br/><button id="btn">点我呀</button>


<script type="text/javascript">
    const btn = document.getElementById("btn");
    btn.onclick = function () {
        alert("点点滴滴~~~")
    };

</script>
</body>
</html>
